package com.haima.sage.bigdata.api.entity.storage;


import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.lettuce.core.cluster.RedisClusterClient;

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME,
        include = JsonTypeInfo.As.EXISTING_PROPERTY,
        property = "mode",
        defaultImpl = RedisDefaultStorageData.class,
        visible = true)
@JsonSubTypes({
        @JsonSubTypes.Type(value = RedisClusterStorageData.class, name = "cluster"),
        @JsonSubTypes.Type(value = RedisSentinelStorageData.class, name = "sentinel") })
public abstract class RedisStorageData {
    private String mode;

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }
}
